// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui';
import store from './store'
import 'element-ui/lib/theme-chalk/index.css';
import VueParticles from 'vue-particles'  
import './assets/css/global.css'
// 导入全局的配置文件
import config from './config.json'
import axios from 'axios'
import qs from 'qs'
import $ from 'jquery'
// 全局自定义样式表
import './assets/font/iconfont.css'
Vue.prototype.$qs = qs



Vue.config.productionTip = false
Vue.use(ElementUI);
Vue.use(VueParticles)
axios.defaults.baseURL = config.baseURL
// 全局配置 axios 的 request 拦截器
axios.interceptors.request.use(config => {
  // 通过拦截request请求,主动为 请求头,追加新属性 Authorization,等于 token 值
  config.headers.Authorization = window.sessionStorage.getItem('token')
  // // 展示进度条
  // NProgress.start()
  return config
})
axios.interceptors.response.use(config => {
  // 隐藏进度条
  // NProgress.done()
  return config
})
Vue.prototype.$http = axios
Vue.config.productionTip = false
/* eslint-disable no-new */


new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
